<template>
  <div>
    <h1>{{ $store.state.name }}</h1>
    <button @click="changeName">点击阿牛</button>
  </div>
</template>

<script>
export default {
  methods: {
    changeName() {
      this.$store.commit("changeName");
    },
  },
};
</script>

<style>
</style>